class Person:
    name = 'aa'
    """
    实例方法的本质是需要接收一个实例
    """
    def intro(self):
        print("这是一个实例方法",self)
        self.age += 1
        print(self.age)

    @classmethod
    def leifangfa(cls):
        print("这是一个类方法",cls)
        print(cls.name)

    @staticmethod
    def jtff():
        print("这是一个静态方法")

a = Person()
a.age=18
print(a)
a.intro()
print(Person)
a.leifangfa()
a.jtff()
print('------------------------')

class Test:
    def tt(self, mark):
        print('考试成绩',self,mark)

    # def tt2():
    #     print("tt")

print(Test.tt)
a = Test()
Test.tt(a,100)
Test.tt(10,100)
# a.tt2()

print('------------------------')
class leiff:
    @classmethod
    def leifangfa(cls,a):
        print("这是一个类方法",cls,a)

a = leiff()
a.leifangfa(100)
leiff.leifangfa(666)

a=[1,2,3]
a.pop()
print(a)

print('------------------------')

class Jtff:
    @staticmethod
    def jtff():
        print("这是一个静态方法")

Jtff.jtff()
a = Jtff()
a.jtff()

#java 的基类是object python的元类是type

print(a.__class__.__class__)
print(int.__class__)